import Home from './components/Home.vue';
import Header from './components/Header.vue';
import News from './components/news/News.vue';
import Comment from './components/comment/Comment.vue';
import Product from './components/product/Product.vue';
import Cart from './components/cart/Cart.vue';
import My from './components/my/My.vue';





export const routes = [
  {path:'/',component:Home,name:'home'},
  {path:'/news',component:News,name:'news'},
  {path:'/comment',component:Comment,name:'comment'},
  {path:'/comment/:id',component:Comment,name:'comment'},
  {path:'/product',component:Product,name:'product'},
  {path:'/cart',component:Cart,name:'cart'},
  {path:'/my',component:My,name:'my'},

  //重定向   path为url栏里输入的地址
  {
      path:'/redirect-you',redirect:{name:'home'}//name为定义的跳转地址的name值
  },
  {
      path:'*',redirect:'/'//输入其他任意的url地址都匹配到首页
  }
]
